package system

import (
	"gin-sns/app/ginframe/router"
	"gin-sns/app/service/middleware/auth"
)

//加载路由
func init() {
	// 参数路由
	g1 := router.New("admin", "/system/dict", auth.Auth)
	g1.GET("/", "system:dict:view", DictTypeController.List)
	g1.POST("/list", "system:dict:list", DictTypeController.ListAjax)
	g1.GET("/add", "system:dict:add", DictTypeController.Add)
	g1.POST("/add", "system:dict:add", DictTypeController.AddSave)
	g1.POST("/remove", "system:dict:remove", DictTypeController.Remove)
	g1.GET("/remove", "system:dict:remove", DictTypeController.Remove)
	g1.GET("/edit", "system:dict:edit", DictTypeController.Edit)
	g1.POST("/edit", "system:dict:edit", DictTypeController.EditSave)
	g1.GET("/detail", "system:dict:detail", DictTypeController.Detail)
	g1.POST("/export", "system:dict:export", DictTypeController.Export)
	g1.POST("/checkDictTypeUniqueAll", "system:dict:view", DictTypeController.CheckDictTypeUniqueAll)
	g1.POST("/checkDictTypeUnique", "system:dict:view", DictTypeController.CheckDictTypeUnique)
	g1.GET("/selectDictTree", "system:dict:view", DictTypeController.SelectDictTree)
	g1.GET("/treeData", "system:dict:view", DictTypeController.TreeData)
}
